package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.CommunicationService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrcomponent.integration.FwCompCommunicationClient;
import com.wicket.okrcomponent.integration.dto.UpdateChangeMessageContentComRespDto;
import com.wicket.okrcomponent.integration.dto.UpdateChangeMessageContentComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrcomponent.integration.dto.ImplementRemovalMessageCorrelationComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementRemovalMessageCorrelationComReqDto;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrcomponent.integration.dto.ImplementShareEveryoneIdeasDeptComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementShareEveryoneIdeasDeptComReqDto;
import com.wicket.okrapp.integration.FwAppCommunicationClient;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Communication", tags = { "Communication" })
@RestController
// @RequestMapping("/oms/communication/")
public class CommunicationController {

  @Autowired
  CommunicationService communicationService;
/**
   * B2更新变更消息内容
   * gen by moon at 1/25/2024, 10:05:48 PM
   */
    @PostMapping("/oms/communication/refreshChangeMessageContent")
    @ApiOperation(value = "B2更新变更消息内容", response = OkrResult.class)
    public OkrResult<BffRefreshChangeMessageContentRespDto> refreshChangeMessageContent(@RequestBody(required=false) @Validated BffRefreshChangeMessageContentReqDto reqDTO){
        return OkrResult.success(communicationService.refreshChangeMessageContent(reqDTO));
    }
/**
   * B2执行删除消息及相关
   * gen by moon at 1/25/2024, 10:22:22 PM
   */
    @PostMapping("/oms/communication/implementRemovalMessageCorrelation")
    @ApiOperation(value = "B2执行删除消息及相关", response = OkrResult.class)
    public OkrResult<BffImplementRemovalMessageCorrelationRespDto> implementRemovalMessageCorrelation(@RequestBody(required=false) @Validated BffImplementRemovalMessageCorrelationReqDto reqDTO){
        return OkrResult.success(communicationService.implementRemovalMessageCorrelation(reqDTO));
    }
/**
   * B2执行分享到部门大家想法
   * gen by moon at 1/26/2024, 1:15:11 AM
   */
    @PostMapping("/oms/communication/implementShareEveryoneIdeasDept")
    @ApiOperation(value = "B2执行分享到部门大家想法", response = OkrResult.class)
    public OkrResult<BffImplementShareEveryoneIdeasDeptRespDto> implementShareEveryoneIdeasDept(@RequestBody(required=false) @Validated BffImplementShareEveryoneIdeasDeptReqDto reqDTO){
        return OkrResult.success(communicationService.implementShareEveryoneIdeasDept(reqDTO));
    }
}
